<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script src="./axios/axios.min.js"></script>
    <script>
        const myax = axios.create({
            baseURL:'http://localhost:8080',
            headers:{
                'content-type':'application/x-www-form-urlencoded'
            }
        })

        // myax({url:'/test/first'}).then(res=>{console.log(res)});


        // myax.get('/test/second').then(res=>{console.log(res)});


        // myax.get('/test/third',{
        //     params:{name:'fuxiang',age:16},
        // }).then(res=>{console.log(res)});


        myax.post('/test/fourth',{name:'naiqiang',age:19}).then(res=>{console.log(res)});

    </script>
</body>
</html>